{% extends "base.html.twig" %}
{%block stylesheets%}
{{parent()}}
 <link rel="stylesheet" href="styles/lesson.css" media="all" type="text/css"/>
{%endblock%}
{% block content%}
{{parent()}}
<h3>КУРС №{{idcourse}}. {{coursename}}</h3></br>
{% for lesson in lessons%}
{{loop.index}}. <a href="lesson/index/{{idcourse}}/{{lesson.idlesson}}/0">{{lesson.title}}</a>
{%if role == 'admin'%}
 [<a href="lesson/remove/{{lesson.idlesson}}">Видалити</a>]
[<a href="lesson/update/{{lesson.idlesson}}">Редагувати</a>]
 {%endif%}
 {%if lesson.completed == false%}
 [<a href="practice/question/{{lesson.idlesson}}">
  Пройти тестування
 {%else%}
 [<a href="practice/results/{{lesson.idlesson}}">
 МоЇ результати
 {%endif%}
 </a>]
<div class="description">{{lesson.description}}</div>
<br/>
{%endfor%}

{%endblock%}